import service from '@/utils/request'

export const getRobotMsg = (id) => {
  return service({
    url: `/admin/robot/${id}`,
    method: 'get'
  })
}

export const putRobotMsg = (id, data) => {
  return service({
    url: `/admin/robot/${id}`,
    method: 'put',
    data
  })
}

export const getWechatLoginCode = () => {
  return service({
    url: '/manager/wechat/user-login',
    method: 'get'
  })
}

export const checkWechatLoginStatus = () => {
  return service({
    url: '/manager/wechat/user-login-result',
    method: 'get'
  })
}

export const getWechatUserInfo = () => {
  return service({
    url: '/manager/wechat/user-info',
    method: 'get'
  })
}

export const logout = () => {
  return service({
    url: '/manager/wechat/user-logout',
    method: 'get'
  })
}

export const updateWechatUserTemp = (data) => {
  return service({
    url: '/manager/wechat/user-update',
    method: 'post',
    data
  })
}
